function qtH = projTHs(invP,d)

qtH = cell(invP.nt,1);
for ii = 1:invP.nt
    qtH{ii} = zeros(invP.mesh.ne,invP.ntx);
    for jj = 1:invP.ntx
        qtH{ii}(:,jj) = invP.Q(jj,:)'*d(ii,jj);
    end
end